package org.lintcode_Close.Stage1_Easy_50.O3数组与循环;

/**
 * @Auther: qingle
 * @Date: 2024/8/17-12:56
 * @Description:
 * @version: 1.0
 */
public class 数组的最大值 {

	public float maxOfArray(float[] a) {
		// write your code here
		float max = a[0];
		for(int i =0; i <= a.length; i++) {
			if (a[i] >= max) {
				max = a[i];
			}
		}
		return max;
	}
}
